import request from '@/utils/request'

export function add(params) {
    return request({
        url: '/ProductCombination/add',
        method: 'POST',
        data: params
    }).then(res => {
        return res
    })
}
export function getList(params = {}) {
    return request({
        url: '/ProductCombination/list',
        method: 'POST',
        data: params
    }).then(({ data }) => {
        return data
    })
}
export function delItem(params) {
    return request({
        url: '/ProductCombination/delete',
        method: 'POST',
        data: params
    }).then(res => res)
}
export function getDetail(params) {
    return request({
        url: '/ProductCombination/detail',
        method: 'POST',
        data: params
    }).then(({
        data
    }) => data)
}
export function update(params) {
    return request({
        url: '/ProductCombination/edit',
        method: 'POST',
        data: params
    }).then(res => res)
}
export function toggleBanner(params) {
    return request({
        url: '/banner/updateStatus',
        method: 'POST',
        data: params
    }).then(res => res)
}
export function getDescDetail(params) {
    return request({
        url: '/productCombinationDesc/detail',
        method: 'POST',
        data: params
    }).then(({
        data
    }) => data)
}
export function saveDesc(params) {
    return request({
        url: '/productCombinationDesc/save',
        method: 'POST',
        data: params
    }).then(res => {
        return res
    })
}